package edu.noteBook.service.impl;

import edu.noteBook.Pojo.Title;
import edu.noteBook.dao.TitleDao;
import edu.noteBook.service.TitleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TitleServiceImpl implements TitleService {
    @Autowired
    private TitleDao titleDao;
    @Override
    public boolean addTitle(String title) {
        return titleDao.addTitle(title);
    }

    @Override
    public boolean deleteTitle(Integer id) {
        return titleDao.deleteTitle(id);
    }

    @Override
    public boolean updateTitle(String title,Integer id) {
        return titleDao.updateTitle(title,id);
    }
    @Override
    public List<Title> queryAllTitle() {
        return titleDao.queryAllTitle();
    }
    @Override
    public List<Title> queryTitle(String title) {
        return titleDao.queryTitle(title);
    }
}
